# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Partners.V2.Model.UserProfile do
  @moduledoc """
  The profile information of a Partners user.

  ## Attributes

  - address (Location): The user&#39;s mailing address, contains multiple fields. Defaults to: `null`.
  - adwordsManagerAccount (String.t): If the user has edit access to multiple accounts, the user can choose the preferred account and it is used when a personal account is needed. Can be empty. Defaults to: `null`.
  - channels ([String.t]): A list of ids representing which channels the user selected they were in. Defaults to: `null`.
  - emailAddress (String.t): The email address the user has selected on the Partners site as primary. Defaults to: `null`.
  - emailOptIns (OptIns): The list of opt-ins for the user, related to communication preferences. Defaults to: `null`.
  - familyName (String.t): The user&#39;s family name. Defaults to: `null`.
  - givenName (String.t): The user&#39;s given name. Defaults to: `null`.
  - industries ([String.t]): A list of ids representing which industries the user selected. Defaults to: `null`.
  - jobFunctions ([String.t]): A list of ids represnting which job categories the user selected. Defaults to: `null`.
  - languages ([String.t]): The list of languages this user understands. Defaults to: `null`.
  - markets ([String.t]): A list of ids representing which markets the user was interested in. Defaults to: `null`.
  - migrateToAfa (boolean()): Whether or not to migrate the user&#39;s exam data to Academy for Ads. Defaults to: `null`.
  - phoneNumber (String.t): The user&#39;s phone number. Defaults to: `null`.
  - primaryCountryCode (String.t): The user&#39;s primary country, an ISO 2-character code. Defaults to: `null`.
  - profilePublic (boolean()): Whether the user&#39;s public profile is visible to anyone with the URL. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :address => GoogleApi.Partners.V2.Model.Location.t(),
          :adwordsManagerAccount => any(),
          :channels => list(any()),
          :emailAddress => any(),
          :emailOptIns => GoogleApi.Partners.V2.Model.OptIns.t(),
          :familyName => any(),
          :givenName => any(),
          :industries => list(any()),
          :jobFunctions => list(any()),
          :languages => list(any()),
          :markets => list(any()),
          :migrateToAfa => any(),
          :phoneNumber => any(),
          :primaryCountryCode => any(),
          :profilePublic => any()
        }

  field(:address, as: GoogleApi.Partners.V2.Model.Location)
  field(:adwordsManagerAccount)
  field(:channels, type: :list)
  field(:emailAddress)
  field(:emailOptIns, as: GoogleApi.Partners.V2.Model.OptIns)
  field(:familyName)
  field(:givenName)
  field(:industries, type: :list)
  field(:jobFunctions, type: :list)
  field(:languages, type: :list)
  field(:markets, type: :list)
  field(:migrateToAfa)
  field(:phoneNumber)
  field(:primaryCountryCode)
  field(:profilePublic)
end

defimpl Poison.Decoder, for: GoogleApi.Partners.V2.Model.UserProfile do
  def decode(value, options) do
    GoogleApi.Partners.V2.Model.UserProfile.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Partners.V2.Model.UserProfile do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
